<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic"%>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="id" lang="id">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>   
</head>
<body>  
	<div class="outerbox">
		<div class="mainHeading">
			<div class=""
				style="width: 350px; height: 32px; background: url(images/formTitleBackground.png) no-repeat top right; font-color: #CC0000;">
				<h2 class="formTitle">SURVEY SUMMARY</h2>
			</div>
		</div>
	</div>

	<!--   ==================================== TABLE ======================================    -->
	<div class="outerbox">
		<html:form action="/surveySummaryList"> 
			<br class="clear" />
			<div id="helpText" class="helpText"></div>
			<table
				style="border-collapse: collapse; width: 100%; text-align: left;"
				class="data-table">
				<colgroup align="right">
					<col width="2%" />
					<col width="30%" />
					<col width="16%" />
					<col width="16%" />
					<col width="16%" />
					<col width="16%" />
					<col width="10%" />
				</colgroup>
				<thead>
					<tr>
						<th style="text-align: left; color: white;" rowspan="1"></th>
						<th style="text-align: left; color: white;" rowspan="1"><a	href="surveySummaryList.do?sort=topic" title="Sort by topic">Topic</a></th>
						<th style="text-align: left; color: white;" rowspan="1"><a	href="surveySummaryList.do?sort=subunit" title="Sort by subunit">Subunit</a></th>
						<th style="text-align: left; color: white;" rowspan="1"><a	href="surveySummaryList.do?sort=lastModifiedUser" title="Sort by user last modified user">Last Modified User</a></th>
						<th style="text-align: left; color: white;" rowspan="1"><a	href="surveySummaryList.do?sort=startDate" title="Sort by start date">Open Date</a></th>
						<th style="text-align: left; color: white;" rowspan="1"><a	href="surveySummaryList.do?sort=endDate" title="Sort by user end date">Expiry Date</a></th>
						<th style="text-align: left; color: white;" rowspan="1"><a	href="surveySummaryList.do?sort=finished" title="Sort by finished">Finished</a></th>
					</tr>
				</thead>
				<tbody>					
					<logic:iterate id="listObjs" name="surveySummaryList" property="listObjs" scope="session" indexId="counter">
						<tr class='<%= counter.intValue()%2 == 0 ? "even" : "odd" %>' >
							<td class="left"></td> 
							<td class="left"><a href="surveySummaryDetail.do?act=view&id=<bean:write name="listObjs" property="id"/>"/><bean:write name="listObjs" property="topic"/></td>
							<td class="left"><bean:write name="listObjs" property="subunit"/></td>
							<td class="left"><bean:write name="listObjs" property="lastModifiedUser"/></td>  
							<td class="left"><bean:write name="listObjs" property="startDateStr"/></td>
							<td class="left"><bean:write name="listObjs" property="endDateStr"/></td>   
							<td class="left">
								<logic:equal value="true" name="listObjs" property="finished">
									<center><img src="./images/accept.png"></img></center>
								</logic:equal>
								<logic:equal value="false" name="listObjs" property="finished">
									<center><img src="./images/delete.png"></img></center>
								</logic:equal>
							</td>     
						</tr>
					</logic:iterate>
				</tbody>
			</table> 
			
			<div id="pageListId" style="margin-right: 10px;margin-bottom: 4px;margin-top: 4px;">
				<logic:iterate id="pageListId" name="surveySummaryList" property="listPages" indexId="counter">
					<logic:equal name="pageListId" value="false" property="isCurrent">
						<td><a style="color: black; font-weight: bold; margin-left: 5px; font-size: 12px;" href="surveySummaryList.do?page=<bean:write name="pageListId" property="value"/>"><bean:write name="pageListId" property="label"/></a></td>
					</logic:equal>
					<logic:notEqual name="pageListId" value="false" property="isCurrent">
						<td><a style="color: red; font-weight: bold; margin-left: 5px; font-size: 13px;"><bean:write name="pageListId" property="label"/></a></td>
					</logic:notEqual>
				</logic:iterate>
			</div>
			
		</html:form>
	</div>
</body>
</html>